// if (null) {
//  console.log("null");
// };
// var chunks = [1,2,3,4,5,'ĺĽ˝ss'];
// console.log(chunks);
// // chunks.splice(0, 2);
// //console.log(chunks);
// // var p = chunks.pop();
// //console.log(p);
// // console.log(chunks);

// function chage(arr) {
//  arr.pop();
// }

// chage(chunks);
// console.log(chunks);

var os = require('os');
var config = {
    'networkInterfaces': os.networkInterfaces,
    'internetFace': function() {
        var result = [];
        var objs = this.networkInterfaces();
        delete objs.lo0;
        for (var obj in objs) {
            if (objs.hasOwnProperty(obj) && Array.isArray(objs[obj])) {
                result.push(objs[obj].map(function(eth) {
                    return eth.address;
                }).filter(function(address) {
                    return (address.indexOf('::') === -1) && (address.indexOf('10.') === -1) && (address.indexOf('192.') === -1);// && (address.indexOf('172.') === -1);
                }));
            }
        };
        return result;
    }
}

//console.log(config.networkInterfaces());
console.log(config.internetFace());
